﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestPictrueGenerator
{
    public partial class TextCopyForm : Form
    {
        public TextCopyForm()
        {
            InitializeComponent();
        }

        private void richTextBox_script_string_DoubleClick(object sender, EventArgs e)
        {
            // Takes the selected text from a text box and puts it on the clipboard.
            if (richTextBox_script_string.Text != "")
                Clipboard.SetDataObject(richTextBox_script_string.Text);
        }

        private void button_copy_Click(object sender, EventArgs e)
        {
            if (richTextBox_script_string.Text != "")
                Clipboard.SetDataObject(richTextBox_script_string.Text);
        }

        private void button_Copy_And_Close_Click(object sender, EventArgs e)
        {
            if (richTextBox_script_string.Text != "")
                Clipboard.SetDataObject(richTextBox_script_string.Text);

            this.Close();
        }

        private void button_Close_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
